package org.chen.spring.cloud.finchley.service;

import feign.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author chensj
 * @date 2020-02-07 17:07
 */
@FeignClient(name = "provider")
public interface ProviderFeignService {
    /**
     * 请求hello
     *
     * @return str
     */
    @RequestMapping(value = "/feign", method = RequestMethod.GET)
    public String helloFeign();

    /**
     * feign请求结果是一个图片流，怎么接收
     * 生成图片验证码
     *
     * @param imagekey 图片key
     * @return 响应
     */
    @RequestMapping(value = "createImagesCode")
    public Response createImageCode(@RequestParam("imagekey") String imagekey);
}
